package com.example.ad_project;

import com.nus.iss.ad.dbhelper.AuthenticateDBHelper;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class StoreActivity extends BaseActivity 
implements OnClickListener
{
	Button buttonConfirmDelivery;
	Button buttonRaiseDiscrepancy;
	Button buttonDisbursementList;
	Button buttonRetrievalList;
	Button buttonLogOut;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_store);
		
		buttonConfirmDelivery=(Button)findViewById(R.id.buttonConfirmDelivery);
		buttonRaiseDiscrepancy=(Button)findViewById(R.id.buttonRaiseDiscrepancy);
		buttonDisbursementList=(Button)findViewById(R.id.buttonDisbursementList);
		buttonRetrievalList=(Button)findViewById(R.id.buttonRetrievalList);
		buttonLogOut=(Button)findViewById(R.id.buttonLogOut);

		
		buttonConfirmDelivery.setOnClickListener(this);
		buttonRaiseDiscrepancy.setOnClickListener(this);
		buttonDisbursementList.setOnClickListener(this);
		buttonRetrievalList.setOnClickListener(this);
		buttonLogOut.setOnClickListener(this);
	}


	
public void onClick(View v){
		
		Intent i;
		
		if(v==buttonConfirmDelivery) {
			i=new Intent(this,ConfirmDeliveryActivity.class);
			startActivity(i);
		}
		else if(v==buttonRaiseDiscrepancy){
			i=new Intent(this,RaiseDiscrepancyActivity.class);
			startActivity(i);
		}
		else if(v==buttonDisbursementList){
			i=new Intent(this,DisbursmentListActivity.class);
			startActivity(i);
		}
		else if(v==buttonRetrievalList){
			i=new Intent(this,RetrivalListActivity.class);
			startActivity(i);
		}
		else if(v==buttonLogOut){
			logOut();
		}
	}

}
